#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct Person Person;
struct Person {
  char name[20];
  int count;
};

int main(int argc, char *argv[]) {
  /* 票箱
   */
  Person p[] = {{"zhangsan", 0}, {"lisi", 0}, {"wangwu", 0}};
  for (int i = 0; i < 10; i++) {
    printf("第%d位选民的投票：", i + 1);
    char vote[20];
    scanf("%s", vote);
    if (strcmp(vote, "zhangsan") == 0) {
      p[0].count++;
    } else if (strcmp(vote, "lisi") == 0) {
      p[1].count++;
    } else if (strcmp(vote, "wangwu") == 0) {
      p[2].count++;
    } else {
      continue;
    }
  }
  for (int i = 0; i < 3; i++) {
    printf("%s的选票：%d\n", p[i].name, p[i].count);
  }
  return EXIT_SUCCESS;
}
